package com.esun.cheetah.view.setting;

import android.app.Activity;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.esun.cheetah.R;
import com.esun.util.VersionUtils;

/**
 * 关于 com.esun.cheetah.view.setting.AboutAct
 * 
 * @author 任付江€ &lt;br/&gt; create at 2012-4-1 下午6:00:40
 */
public class AboutAct extends Activity {
	private Button btnAboutBack;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about);
		btnAboutBack = (Button) findViewById(R.id.btnAboutback);
		TextView tv=(TextView) findViewById(R.id.tvVersion);
		try {
			tv.setText(getText(R.string.version)+""+ (this.getPackageManager().getPackageInfo(this.getPackageName(), -1)).versionName);
		} catch (NameNotFoundException e) {
			tv.setText(getText(R.string.version)+""+ VersionUtils.getInstance().getVersion(this));
		}
		btnAboutBack.setOnClickListener(new OnClickListener() {
		
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}

}
